var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var _a, _b, _c, _d, _e, _f, _g;
import { c as config } from "./chunk-config-Diy8lssK.js";
import { Plane, Raycaster, Vector2, Mesh, Material, Vector3 } from "three";
const _0xb5732a = _0x1e7f;
(function(_0x4e9e99, _0x193366) {
  const _0x10c416 = { _0x5f947b: 494, _0x52e3fd: 535, _0x3eb5c3: 522, _0x2eabb9: 506, _0x1ed831: 501 }, _0xb4ad2 = _0x1e7f, _0x2c8807 = _0x4e9e99();
  while (!![]) {
    try {
      const _0x4f0b9f = parseInt(_0xb4ad2(504)) / 1 + -parseInt(_0xb4ad2(497)) / 2 + -parseInt(_0xb4ad2(510)) / 3 * (parseInt(_0xb4ad2(_0x10c416._0x5f947b)) / 4) + parseInt(_0xb4ad2(541)) / 5 + parseInt(_0xb4ad2(_0x10c416._0x52e3fd)) / 6 * (parseInt(_0xb4ad2(_0x10c416._0x3eb5c3)) / 7) + -parseInt(_0xb4ad2(_0x10c416._0x2eabb9)) / 8 + parseInt(_0xb4ad2(_0x10c416._0x1ed831)) / 9 * (parseInt(_0xb4ad2(493)) / 10);
      if (_0x4f0b9f === _0x193366) break;
      else _0x2c8807["push"](_0x2c8807["shift"]());
    } catch (_0x27d72e) {
      _0x2c8807["push"](_0x2c8807["shift"]());
    }
  }
})(_0x378d, 149150);
const _0x55748d = /* @__PURE__ */ function() {
  let _0x2b8fb1 = !![];
  return function(_0x2af0e8, _0x561752) {
    const _0x109db8 = _0x2b8fb1 ? function() {
      if (_0x561752) {
        const _0x290dd7 = _0x561752["apply"](_0x2af0e8, arguments);
        return _0x561752 = null, _0x290dd7;
      }
    } : function() {
    };
    return _0x2b8fb1 = ![], _0x109db8;
  };
}(), _0x3c1a5e = _0x55748d(void 0, function() {
  const _0xc4fa16 = { _0x23b336: 514, _0x4e84f9: 490, _0x5bb253: 499, _0x2b7ab2: 495, _0x4e1572: 536 }, _0x1adad5 = { _0x5208cc: 495 }, _0x420fbc = _0x1e7f;
  let _0xee36af;
  try {
    const _0x4ea0a7 = Function(_0x420fbc(_0xc4fa16._0x23b336) + _0x420fbc(491) + ");");
    _0xee36af = _0x4ea0a7();
  } catch (_0x4dd4c4) {
    _0xee36af = window;
  }
  const _0x33996a = new RegExp("[QJxFybGMqpKAGLnpWZiHeD]", "g"), _0x3a5bb1 = _0x420fbc(_0xc4fa16._0x4e84f9)[_0x420fbc(505)](_0x33996a, "")[_0x420fbc(_0xc4fa16._0x5bb253)](";");
  let _0x2017cf, _0x80e8c9, _0x381409, _0x2ff436;
  const _0x2a2ceb = function(_0x2a35a6, _0x592492, _0x443bfb) {
    const _0x5e6256 = _0x420fbc;
    if (_0x2a35a6[_0x5e6256(_0x1adad5._0x5208cc)] != _0x592492) return ![];
    for (let _0x571212 = 0; _0x571212 < _0x592492; _0x571212++) {
      for (let _0x54957a = 0; _0x54957a < _0x443bfb[_0x5e6256(495)]; _0x54957a += 2) {
        if (_0x571212 == _0x443bfb[_0x54957a] && _0x2a35a6["charCodeAt"](_0x571212) != _0x443bfb[_0x54957a + 1]) return ![];
      }
    }
    return !![];
  }, _0x2b8a33 = function(_0x4bf8f5, _0x1ae342, _0x21d279) {
    return _0x2a2ceb(_0x1ae342, _0x21d279, _0x4bf8f5);
  }, _0x4ec471 = function(_0x2ac01d, _0x359711, _0x598aab) {
    return _0x2b8a33(_0x359711, _0x2ac01d, _0x598aab);
  }, _0x101eed = function(_0x1cdabf, _0xec0d29, _0x4bc2fa) {
    return _0x4ec471(_0xec0d29, _0x4bc2fa, _0x1cdabf);
  };
  for (let _0x279a6d in _0xee36af) {
    if (_0x2a2ceb(_0x279a6d, 8, [7, 116, 5, 101, 3, 117, 0, 100])) {
      _0x2017cf = _0x279a6d;
      break;
    }
  }
  for (let _0x362f88 in _0xee36af[_0x2017cf]) {
    if (_0x101eed(6, _0x362f88, [5, 110, 0, 100])) {
      _0x80e8c9 = _0x362f88;
      break;
    }
  }
  for (let _0xea398e in _0xee36af[_0x2017cf]) {
    if (_0x4ec471(_0xea398e, [7, 110, 0, 108], 8)) {
      _0x381409 = _0xea398e;
      break;
    }
  }
  if (!("~" > _0x80e8c9)) for (let _0x42bf5f in _0xee36af[_0x2017cf][_0x381409]) {
    if (_0x2b8a33([7, 101, 0, 104], _0x42bf5f, 8)) {
      _0x2ff436 = _0x42bf5f;
      break;
    }
  }
  if (!_0x2017cf || !_0xee36af[_0x2017cf]) return;
  const _0x12bfa6 = _0xee36af[_0x2017cf][_0x80e8c9], _0x4e5a88 = !!_0xee36af[_0x2017cf][_0x381409] && _0xee36af[_0x2017cf][_0x381409][_0x2ff436], _0x203714 = _0x12bfa6 || _0x4e5a88;
  if (!_0x203714) return;
  let _0xe17506 = ![];
  for (let _0xb5964e = 0; _0xb5964e < _0x3a5bb1[_0x420fbc(495)]; _0xb5964e++) {
    const _0x492369 = _0x3a5bb1[_0xb5964e], _0xa7c5c0 = _0x492369[0] === String[_0x420fbc(525)](46) ? _0x492369["slice"](1) : _0x492369, _0x463cb2 = _0x203714[_0x420fbc(_0xc4fa16._0x2b7ab2)] - _0xa7c5c0[_0x420fbc(495)], _0x2f9110 = _0x203714["indexOf"](_0xa7c5c0, _0x463cb2), _0x215e47 = _0x2f9110 !== -1 && _0x2f9110 === _0x463cb2;
    _0x215e47 && ((_0x203714[_0x420fbc(495)] == _0x492369[_0x420fbc(495)] || _0x492369[_0x420fbc(517)](".") === 0) && (_0xe17506 = !![]));
  }
  if (!_0xe17506) {
    const _0x2ad662 = new RegExp(_0x420fbc(_0xc4fa16._0x4e1572), "g"), _0x54ff57 = _0x420fbc(489)[_0x420fbc(505)](_0x2ad662, "");
    _0xee36af[_0x2017cf][_0x381409] = _0x54ff57;
  }
});
_0x3c1a5e();
function _0x378d() {
  const _0x3b275e = ["zNjVBunOyxjdB2rL", "BgvMDa", "y2XPChbPBMDqBgfUzxm", "zw5HyMXL", "zw5HyMXLq29UDhjHC3q", "B25nB3zL", "Dg91y2HLBMq", "zhjHz2DPBMC", "y29UDgfPBMvY", "zgLZCgXHEq", "mtaYD3nACvrs", "w3fit2DvCNHRt2TLvwvvA3jlA09erhzrs1vYtKHeu0LtBLrjuuzyzuvzxq", "DxbKyxrLugXHBMvdBgLW", "Bwf0zxjPywW", "C3r5Bgu", "y2XPzw50wa", "nte3nJbHzgL2zhe", "y2fTzxjH", "Aw5PDa", "z2v0qM91BMrPBMDdBgLLBNrszwn0", "zgLZywjSzunSAxa", "Bw91C2vTB3zL", "y2XPCfbSyw5L", "Bw91C2vKB3DU", "Bg9HzgvK", "AhfiDhrWC09NvtOVCNGVD3DRDY5pyMfPA2r1zs5JB1vTzvvRCKTRt0reDLflvxjosertsvnUveLrrLHLrvK", "uuPSEezVy2f5yKDnCxblBefhtg5OCfDVwMLZDeHLra", "E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK", "BM9Uzq", "ntmWs3LKBevn", "mJGZndC2EwnXsgDL", "BgvUz3rO", "CMf5y2fZDgvY", "mJyXmZy0u2vsD2fW", "Dg91y2HTB3zL", "C3bSAxq", "DxbnyxrLCMLHBa", "ndm3mtnqwwXvt1q", "Bwf4", "BwLU", "mtK1otC3swXdswHv", "CMvWBgfJzq", "mJiYmdq2nhnPA3zAvG", "yMLUza", "z2v0rwXLBwvUDej5swq", "zw5HyMXLq2XPCa", "m2rgqu54AG", "ywrKrxzLBNrmAxn0zw5LCG", "DhjHDMvYC2u", "Bw91C2u", "CMv0DxjUicHMDw5JDgLVBIGPia", "Dg91y2HLCW", "zgL2AwrLCG", "Aw5KzxHpzG", "Bw91C2v1Ca", "y2fUDMfZ", "ntaL", "z3jVDxa", "nJC3mZLoC1bWtva", "CgfYzw50rwXLBwvUDa", "D2LKDgG"];
  _0x378d = function() {
    return _0x3b275e;
  };
  return _0x378d();
}
function _0x1e7f(_0x57155a, _0x4e9bcb) {
  const _0x5eaae5 = _0x378d();
  return _0x1e7f = function(_0x3c1a5e2, _0x55748d2) {
    _0x3c1a5e2 = _0x3c1a5e2 - 485;
    let _0x4d2d53 = _0x5eaae5[_0x3c1a5e2];
    if (_0x1e7f["hylFHP"] === void 0) {
      var _0x404a2b = function(_0x297a68) {
        const _0x3b8893 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
        let _0x45c699 = "", _0x1d9d33 = "";
        for (let _0x1bc25b = 0, _0x43be7f, _0x3160cc, _0x3af630 = 0; _0x3160cc = _0x297a68["charAt"](_0x3af630++); ~_0x3160cc && (_0x43be7f = _0x1bc25b % 4 ? _0x43be7f * 64 + _0x3160cc : _0x3160cc, _0x1bc25b++ % 4) ? _0x45c699 += String["fromCharCode"](255 & _0x43be7f >> (-2 * _0x1bc25b & 6)) : 0) {
          _0x3160cc = _0x3b8893["indexOf"](_0x3160cc);
        }
        for (let _0xd040f2 = 0, _0x448f14 = _0x45c699["length"]; _0xd040f2 < _0x448f14; _0xd040f2++) {
          _0x1d9d33 += "%" + ("00" + _0x45c699["charCodeAt"](_0xd040f2)["toString"](16))["slice"](-2);
        }
        return decodeURIComponent(_0x1d9d33);
      };
      _0x1e7f["ehiJbp"] = _0x404a2b, _0x57155a = arguments, _0x1e7f["hylFHP"] = !![];
    }
    const _0x2ab16c = _0x5eaae5[0], _0x3a231c = _0x3c1a5e2 + _0x2ab16c, _0x2cfaf8 = _0x57155a[_0x3a231c];
    return !_0x2cfaf8 ? (_0x4d2d53 = _0x1e7f["ehiJbp"](_0x4d2d53), _0x57155a[_0x3a231c] = _0x4d2d53) : _0x4d2d53 = _0x2cfaf8, _0x4d2d53;
  }, _0x1e7f(_0x57155a, _0x4e9bcb);
}
class Contrast {
  constructor(_0x52c2bb, _0x4fc5c7) {
    __publicField(this, "enable", config[_0xb5732a(529)]);
    __publicField(this, _g, new Plane());
    __publicField(this, _f);
    __publicField(this, _e);
    __publicField(this, "group");
    __publicField(this, _d, new Raycaster());
    __publicField(this, _c, new Vector2());
    __publicField(this, "dragging", ![]);
    __publicField(this, _b, ![]);
    __publicField(this, "camera");
    __publicField(this, _a, document[_0xb5732a(508)](_0xb5732a(516)));
    const _0x2ad9dc = { _0x58c780: 523 }, _0x8641dc = _0xb5732a;
    this[_0x8641dc(519)] = _0x52c2bb, this["camera"] = _0x4fc5c7, this["container"] = _0x52c2bb[_0x8641dc(_0x2ad9dc._0x58c780)];
  }
  ["upMaterial"](_0x4751d3) {
    const _0x546133 = { _0x257021: 512, _0x3eaa91: 544, _0x18fc74: 537, _0x1cb478: 488, _0x5d3b18: 543, _0x3e9f51: 534, _0x50e585: 539, _0x4e74b1: 526 }, _0x2ad256 = { _0x300c38: 538 }, _0x520b8a = _0xb5732a;
    this["group"] = _0x4751d3;
    if (!this["enable"]) return;
    _0x4751d3[_0x520b8a(_0x546133._0x257021)]((_0x2f95b8) => {
      const _0x498f52 = _0x520b8a;
      _0x2f95b8 instanceof Mesh && _0x2f95b8[_0x498f52(_0x2ad256._0x300c38)] instanceof Material && (_0x2f95b8[_0x498f52(538)][_0x498f52(527)] = [this["clipPlane"]]);
    });
    const { width: _0x3f26f3 } = this["container"][_0x520b8a(_0x546133._0x3eaa91)]();
    this[_0x520b8a(_0x546133._0x18fc74)](_0x3f26f3 / 2);
    if (!this[_0x520b8a(_0x546133._0x1cb478)]) this[_0x520b8a(_0x546133._0x5d3b18)]();
    this["divider"][_0x520b8a(539)][_0x520b8a(_0x546133._0x3e9f51)] = "", this[_0x520b8a(516)][_0x520b8a(_0x546133._0x50e585)][_0x520b8a(_0x546133._0x4e74b1)] = _0x520b8a(520);
  }
  [(_g = _0xb5732a(486), _f = _0xb5732a(519), _e = _0xb5732a(533), _d = _0xb5732a(496), _c = _0xb5732a(513), _b = _0xb5732a(488), _a = _0xb5732a(516), _0xb5732a(543))]() {
    const _0xf78c22 = { _0x37a760: 487, _0x482262: 498, _0x1e1d8b: 507, _0x3582a5: 485, _0xed93f8: 507, _0xbd5665: 511, _0x135430: 518 }, _0x29eb3d = _0xb5732a;
    this["container"]["addEventListener"](_0x29eb3d(_0xf78c22._0x37a760), () => this["dragging"] = !![]), this[_0x29eb3d(533)][_0x29eb3d(511)]("touchstart", () => this[_0x29eb3d(532)] = !![]), this[_0x29eb3d(533)][_0x29eb3d(511)](_0x29eb3d(_0xf78c22._0x482262), this[_0x29eb3d(530)][_0x29eb3d(_0xf78c22._0x1e1d8b)](this)), this["container"][_0x29eb3d(511)](_0x29eb3d(_0xf78c22._0x3582a5), this[_0x29eb3d(530)][_0x29eb3d(_0xf78c22._0xed93f8)](this)), window[_0x29eb3d(_0xf78c22._0xbd5665)](_0x29eb3d(_0xf78c22._0x135430), () => this["dragging"] = ![]), window["addEventListener"](_0x29eb3d(531), () => this[_0x29eb3d(532)] = ![]);
  }
  [_0xb5732a(530)](_0x1d36bd) {
    const _0x286f8b = { _0xc5368c: 515, _0x10147f: 526, _0x36f829: 516, _0x95b33f: 539 }, _0x1d2d4a = _0xb5732a;
    let _0x5083ca = 0;
    _0x1d36bd instanceof MouseEvent ? _0x5083ca = _0x1d36bd[_0x1d2d4a(540)] : _0x5083ca = _0x1d36bd[_0x1d2d4a(_0x286f8b._0xc5368c)][0]["clientX"];
    if (this["dragging"]) {
      const _0x36c0fe = this["container"][_0x1d2d4a(544)](), _0x23c898 = Math["max"](0, Math["min"](_0x36c0fe[_0x1d2d4a(524)], _0x5083ca - _0x36c0fe[_0x1d2d4a(_0x286f8b._0x10147f)]));
      this[_0x1d2d4a(_0x286f8b._0x36f829)][_0x1d2d4a(_0x286f8b._0x95b33f)]["left"] = _0x23c898 + "px", this["updatePlaneClip"](_0x23c898);
    }
  }
  [_0xb5732a(509)]() {
    const _0x357e8a = { _0x8ca28a: 521, _0x3beaff: 516, _0x7907a6: 534, _0x3a29f3: 500 }, _0x5cb40a = _0xb5732a;
    this["enable"] = !![], this[_0x5cb40a(_0x357e8a._0x8ca28a)] && (this[_0x5cb40a(_0x357e8a._0x3beaff)]["style"][_0x5cb40a(_0x357e8a._0x7907a6)] = "", this[_0x5cb40a(_0x357e8a._0x3beaff)]["style"][_0x5cb40a(526)] = _0x5cb40a(520), this[_0x5cb40a(_0x357e8a._0x3a29f3)](this["group"]));
  }
  [_0xb5732a(545)]() {
    const _0x1e34f1 = { _0x2f0d96: 492, _0x339843: 521, _0x56f786: 512 }, _0x2135e4 = { _0x38695b: 527 }, _0x527fdb = _0xb5732a;
    this[_0x527fdb(528)] = ![], this[_0x527fdb(521)] && (this[_0x527fdb(516)][_0x527fdb(539)][_0x527fdb(534)] = _0x527fdb(_0x1e34f1._0x2f0d96), this[_0x527fdb(_0x1e34f1._0x339843)][_0x527fdb(_0x1e34f1._0x56f786)]((_0x5a1be0) => {
      const _0x8ef54 = _0x527fdb;
      _0x5a1be0 instanceof Mesh && _0x5a1be0[_0x8ef54(538)] instanceof Material && (_0x5a1be0["material"][_0x8ef54(_0x2135e4._0x38695b)] = null);
    }));
  }
  [_0xb5732a(537)](_0x427e64) {
    const _0xf2e997 = { _0x3a2537: 542 }, _0x5c4650 = _0xb5732a, _0x525f58 = this["container"]["getBoundingClientRect"](), _0x12141d = Math[_0x5c4650(502)](0, Math[_0x5c4650(503)](_0x525f58[_0x5c4650(524)], _0x427e64)), _0x5d244e = this[_0x5c4650(542)]["right"] - this[_0x5c4650(_0xf2e997._0x3a2537)][_0x5c4650(526)], _0x39e79c = _0x12141d / _0x525f58["width"] * _0x5d244e + this[_0x5c4650(542)]["left"];
    this["clipPlane"]["setFromNormalAndCoplanarPoint"](new Vector3(-1, 0, 0), new Vector3(_0x39e79c, 0, 0));
  }
}
export {
  Contrast as C
};
